#include "stdafx.h"
#include "TestProject.h"
#include "Project.h"

using namespace PDMS::PDMSFrame;

CPPUNIT_TEST_SUITE_REGISTRATION( TestProject );


TestProject::TestProject()
{
}


TestProject::~TestProject()
{
}

void TestProject::TestSave()
{
	Project prj;

	CPPUNIT_ASSERT( prj.Save() == UESoft::eOk );
}

void TestProject::TestGetCurDatabase()
{
	Project prj;
	CPPUNIT_ASSERT( prj.GetCurDatabase() == NULL );
}

void TestProject::TestGetCurConfigration()
{
	Project prj;
	CPPUNIT_ASSERT( prj.GetCurConfigration() == NULL );
}

void TestProject::TestReadPrjDatabase()
{
	Project prj;

//	UESoft::ErrorStatus es = prj.ReadPrjDatabase( _T("test") );
//	CPPUNIT_ASSERT( es == UESoft::eOk );
//	CPPUNIT_ASSERT( prj.GetCurDatabase() != NULL );
//	CPPUNIT_ASSERT( prj.GetCurConfigration() != NULL );
//	CPPUNIT_ASSERT( !prj.Name().IsEmpty() );
//	CPPUNIT_ASSERT( !prj.Path().IsEmpty() );
}